import './assets/main.css'
import apps from './qiankun.js'
import { registerMicroApps, addGlobalUncaughtErrorHandler } from 'qiankun'

// 注册微应用
registerMicroApps(apps, {
  beforeLoad: () => console.log('before load'),
  beforeMount: [() => console.log('before mount')],
  afterMount: () => console.log('*********'),
  beforeUnmount: () => console.log('****beforeUnmount *****'),
  afterUnmount: () => console.log('-------afterUnmount *********---')
})

// 全局的未捕获异常处理器
addGlobalUncaughtErrorHandler(event => {
  console.log(event)
})

import { createApp } from 'vue'
import { createPinia } from 'pinia'

import App from './App.vue'
import router from './router'

const app = createApp(App)

app.use(createPinia())
app.use(router)

app.mount('#app')
